<?php
/**
 * Unfuddle Account Model
 * All data in Unfuddle is within an account.
 *
 * @package     Unfuddle
 * @subpackage  Data Models
 * @author      Luke Visinoni <luke.visinoni@gmail.com>
 * @copyright   (c) 2010 Luke Visinoni <luke.visinoni@gmail.com>
 * @version     $Id: Account.php 27 2011-01-15 10:33:26Z luke.visinoni $
 */
class Unfuddle_Model_Account extends Unfuddle_Model_Abstract {

    protected $_name = 'account';
        
    protected $_fields = array(
        'access-key' => array('type' => 'text', 'required' => false, 'read-only' => true),
        'created-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
        'default-ticket-report-id' => array('type' => 'integer', 'required' => false, 'read-only' => false),
        'default-time-zone' => array('type' => 'text', 'required' => false, 'read-only' => false), // i.e. "Pacific Time (US & Canada)"
        'description' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'disk-usage' => array('type' => 'integer', 'required' => false, 'read-only' => true), // in Kilobytes
        'id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        'plan' => array('type' => 'set', 'required' => false, 'read-only' => true, 'set' => array('private', 'micro', 'compact', 'corporate', 'enterprise')),
        'subdomain' => array('type' => 'text', 'required' => false, 'read-only' => true),
        'text-markup' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('markdown', 'textile', 'plain')),
        'title' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'updated-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
        /**
         * the following is read-only and describes the feature set of an account
         * @todo Unfuddle_Model_Abstract doesn't currently support these...
         */
        'features.attachments' => array('type' => 'boolean', 'required' => false, 'read-only' => true),
        'features.ssl' => array('type' => 'boolean', 'required' => false, 'read-only' => true),
        'features.storage' => array('type' => 'boolean', 'required' => false, 'read-only' => true),
        'features.time-tracking' => array('type' => 'boolean', 'required' => false, 'read-only' => true),
    );

}